﻿using System;
using System.Linq;
using System.Text;
using SqlSugar;

namespace WLYT.Domain.Entries
{
    ///<summary>
    ///接口日志
    ///</summary>
    [Tenant("db2")]
    [SplitTable(SplitType.Season)]
    [SugarTable("LogRecord_{year}{month}{day}")]
    public partial class LogRecord
    {
        /// <summary>
        /// Desc:
        /// Default:DateTime.Now
        /// Nullable:False
        /// </summary>      
        [SplitField]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string IP { get; set; } = "";

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string Method { get; set; } = "";

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>    
        [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string RequestUri { get; set; } = "";

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>           
        [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string RequestContent { get; set; } = "";

        /// <summary>
        /// Desc:
        /// Default:
        /// Nullable:False
        /// </summary>
        [SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString)]
        public string ResponseContent { get; set; } = "";

        /// <summary>
        /// Desc:
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public int Timer { get; set; } = 0;

        /// <summary>
        /// Desc:是否成功
        /// Default:0
        /// Nullable:False
        /// </summary>     
        public bool IsSuccess { get; set; } = false;

    }
}
